package com.example.demo.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.example.demo.custom.BaseRepository;
import com.example.demo.entity.AccessoriesChannels;
import com.example.demo.entity.AccessoriesChannels2;
@Repository
public interface AccessoriesChannels2Repository extends BaseRepository<AccessoriesChannels2, Integer>{

	List<AccessoriesChannels2> findByAccessoriesChannelsId(Integer id);

	List<AccessoriesChannels2> findByAccessoriesChannels(AccessoriesChannels acc);
	@Query(value ="from AccessoriesChannels2 g where g.accessoriesChannels.name=?1 and g.category=?2")
	List<AccessoriesChannels2> findByAccessoriesChannelsNameAndCategory(String name, String category);

	AccessoriesChannels2 findByCategory(String category);

}
